<article class="show_list-shows-item">
  <div class="show_list-shows-item-wrap">
    <%= link(to: ~p"/#{@podcast.slug}", class: "show_list-shows-item-art", title: "View #{@podcast.name}") do %>
      <%= SharedHelpers.lazy_image(cover_url(@podcast, :medium), "#{@podcast.name} Artwork", width: 220, height: 220) %>
      <%= if @podcast.status == :soon do %>
        <div class="show_list-shows-item-art-status show_list-shows-item-art-status--soon"><span><%= status_text(@podcast) %></span></div>
      <% end %>
    <% end %>
    <div class="show_list-shows-item-content">
      <div class="show_list-shows-item-content-heading">
        <h2><a href={~p"/#{@podcast.slug}"}><%= @podcast.name %></a></h2>
        <%= if Podcast.is_publishing(@podcast) && Podcast.has_feed(@podcast) do %>
          <button class="show_list-shows-item-content-heading-subscribe has-tooltip" title="Subscribe">Subscribe</button>
          <%= render("_subscribe_tooltip.html", podcast: @podcast) %>
        <% end %>
      </div>
      <%= @podcast.description |> SharedHelpers.md_to_html() |> raw() %>
    <%= if Enum.any?(@podcast.active_hosts) do %>
      <h3>Hosted by:</h3>
      <ul class="show_list-shows-item-content-hosts">
      <%= if length(@podcast.active_hosts) > 3 do %>
        <%= for person <- Enum.take_random(@podcast.active_hosts, 3) do %>
          <li><%= link(person.name, to: PersonView.profile_path(person)) %></li>
        <% end %>
          <li><%= link("and more...", to: ~p"/#{@podcast.slug}") %></li>
      <% else %>
        <%= for person <- @podcast.active_hosts do %>
          <li><%= link(person.name, to: PersonView.profile_path(person)) %></li>
        <% end %>
      <% end %>
      </ul>
    <% end %>
    </div>
  </div>
</article>
